package kt.base

/*
*   shl(bits) – 左移位 (Java’s <<)
    shr(bits) – 右移位 (Java’s >>)
    ushr(bits) – 无符号右移位 (Java’s >>>)
    and(bits) – 与  &
    or(bits) – 或   ||
    xor(bits) – 异或
    inv() – 反向
* */

fun main() {

    var v = 0
    var v1 = 1

    var v2 = 2
    var v3 = 3

    println("v = ${v shr 1 } ; v1 = ${v1 shr 1} ; ; v2 = ${v2 shr 1} ; ; v3 = ${v3 shr 1}")

    var index = v2 shr 1

    println("index = ${index}")

    index = index shl 1

    println("中间 index = ${index}")

    index = index + 1

    println("after index = ${index}")






}